home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / unix / hdf3_2r2.lha / HDF3.2r2 / util / README.UTILS < prev    next >
Encoding:
Text File  |  1992-10-28  |  5.0 KB  |  146 lines

  1.  
  2. Instructions on testing the HDF utility programs.
  3.  
  4.  
  5. hdf24to8:
  6.  
  7.    Copy head.r24 in the examples/files directory.  
  8.  
  9.    Execute: 
  10.         hdf24to8 head.r24 head8.hdf
  11.  
  12.    View head8.hdf.
  13.  
  14.    Not yet tested: error traps
  15.  
  16. ristosds:
  17.  
  18.    Copy the three HDF files storm110.hdf, storm120.hdf, and
  19.    storm130.hdf from the examples/files directory.
  20.  
  21.    Execute:
  22.         ristosds storm*.hdf -o storm.hdf
  23.  
  24.    Use hdfed to compare storm*.hdf with storm.hdf:
  25.       In storm.hdf tag 702's element should be 38988 bytes.
  26.       In storm110.hdf tag 302's element should be 12th of
  27.          this, which is 3249.  (It is a 57x57 image.)
  28.       Compare the first few numbers in storm110's image
  29.       with the first few numbers in storm.hdf's SDS.  They
  30.       should be the same.
  31.  
  32.  
  33. hdfpack:
  34.  
  35.    Copy the file test.cdf from the examples/files directory.
  36.  
  37.    Execute:
  38.         hdfpack test.cdf test.pck
  39.         hdfpack -b test.cdf test.blk
  40.  
  41.    Use hdfls to get a listing of test.cdf and test.pck.  The only
  42.        difference between the 2 listings should be that test.pck
  43.        shouldn't have any special elements (they show up as "Unknown
  44.        Tag") and it also shouldn't have any "Linked Block Indicators."
  45.    Use the HDF browser to verify that the Vgroup named "Float" has a
  46.        Vdata with ref no. 55 that contains the values:
  47.        0.0, 1.0, 2.0,..., 359.0
  48.    The file sizes should be as follows:
  49.        test.cdf - 11795
  50.        test.pck - 6747
  51.        test.blk - 8111
  52.  
  53.  
  54. hdftopal/paltohdf
  55.  
  56.    Copy the file palette.raw from the examples/files directory.
  57.  
  58.    Execute:
  59.         paltohdf palette.raw palette.hdf
  60.         hdftopal palette.hdf palette.raw.new
  61.  
  62.    Use hdfls with the '-l' option to examine the HDF palette file.
  63.         It should have an 'Image Palette-8' and an 'Image Palette,'
  64.         both with length 768 bytes.  They should also have the same
  65.         reference number.
  66.    Use the Unix utility 'cmp' or something similar to do a byte-for-byte
  67.         comparison of palette.raw and palette.raw.new.  They should be
  68.         identical.
  69.  
  70.  
  71. r8tohdf/hdftor8
  72.  
  73.    Copy the files storm*.raw and palette.raw from the examples/files directory.
  74.  
  75.    Execute:
  76.         r8tohdf 57 57 storm.hdf storm*.raw
  77.         r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
  78.         hdftor8 storm.hdf
  79.  
  80.    Use hdfls with the '-l' option to examine the HDF file.  It should
  81.         contain five raster image sets, one of which will be compressed
  82.         under IMCOMP compression.  (If you do not put the '-p' in the
  83.         second r8tohdf command above, you should get an error message.)
  84.         The non-compressed rasters images should be the same length as
  85.         the raw raster files.  The compressed will be about 25% of that
  86.         size.
  87.    Use the Unix utility 'cmp' or something similar to do byte-for-byte
  88.         comparisons on the produced raw raster files by hdftor8.  There
  89.         should be one more than you had at the start.  One of them may
  90.         not compare exactly with any one of the raw rasters, 
  91.          and the rest will compare with one of
  92.         the other raw rasters.  There is no guarantee about the order
  93.         of the produced raw rasters, but it is likely they will be produced
  94.         in the order in which they went into the file, which would be
  95.         increasing numerical order, with the compressed image last.
  96.  
  97.  
  98. hdfcomp
  99.  
  100.    Copy the files storm*.hdf from the examples/files directory.
  101.  
  102.    Execute:
  103.         hdfcomp allstorms.hdf storm*.hdf
  104.         hdfcomp allcomp.hdf -c storm*.hdf
  105.  
  106.    Use hdfls with the '-l' option to examine the two HDF files.  The first,
  107.         allstorms.hdf, should simply hold the raster together in one file,
  108.         with no compression.  You can use hdfls to check the original files.
  109.         The second file, allcomp.hdf, should hold all the rasters in a
  110.         compress format.  Run-Length Encoding (RLE) compression will result
  111.         in modest savings - about 10% to 15% for these files.
  112.  
  113. hdfed
  114.  
  115.    Copy the file storm110.hdf from the examples/files directory.
  116.  
  117.    Execute:
  118.         hdfed storm110.hdf
  119.  
  120.         Running interactively, type the following commands:
  121.  
  122.                 info -all
  123.                 prev tag = 300
  124.                 info -long
  125.                 dump -short
  126.  
  127.         The latter two commands should result in the following responses:
  128.  
  129.          (6)    Image Dimensions              : (Tag 300)
  130.                 Ref: 110, Offset: 3459, Length: 20 (bytes)
  131.        0:          0         57          0         57        106        110
  132.       12:          1          0          0          0
  133.  
  134.  
  135.         Type help and experiment.  Most of the information can be verified
  136.         with hdfls.  Be sure to type 'close' then 'quit' when you are finished.
  137.  
  138.    CAUTION: This utility is currently using the Unix utility 'od' (octal dump)
  139.    to examine the contents of the HDF file.  This utility does not exist under
  140.    PC and Mac environments.  Also, because of the internal storage methods of
  141.    HDF, little-endian machines will give garbled results. Also, on some
  142.    machines, such as the Cray and Convex, the dump will be different from
  143.    the one shown above because the wordsize is different.
  144.  
  145.  
  146.